<?xml version='1.0' encoding='ISO-8859-1' ?>
<ui:composition template="/templates/padrao.xhtml"
     xmlns="http://www.w3.org/1999/xhtml"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui">
     
     <ui:define name="centro">
     <h:form>
     	<p:dataTable id="datatableJogador" 
				var="jogador"
				styleClass="userDataTableStyle"
				value="#{jogadorMB.listarJogadores}"
				paginator="true"
				rows="10"
				paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="5,10,15" >
				
				<f:facet name="header">
					<h:outputText value="#{msg.jogadorTitulo}" />					
				</f:facet>
				
                <p:column >
                    <f:facet name="header">  
			            <h:outputText value="#{msg.jogadorNome}" />  
			        </f:facet> 
	                <h:outputText value="#{jogador.nome}"/>                                       
                 </p:column>

                <p:column >
                    <f:facet name="header">  
			            <h:outputText value="#{msg.jogadorApelido}" />  
			        </f:facet> 
	                <h:outputText value="#{jogador.apelido}"/>       
                 </p:column>
                 
                 <p:column >
                    <f:facet name="header">  
			            <h:outputText value="#{msg.jogadorSexo}" />  
			        </f:facet> 
	                <h:outputText value="#{jogador.sexo}"/>     
                 </p:column>
                
                 <p:column >
                     <f:facet name="header">  
			            <h:outputText value="#{msg.jogadorEndereco}" />  
			        </f:facet> 
	                <h:outputText value="#{jogador.endereco}"/>                                         
                 </p:column>
                 
                 <f:facet name="footer">
                 	<p:panel header="#{msg.exportData}">  
				        <h:commandLink>  
				            <p:graphicImage value="/resources/imagens/excel.png" />  
				            <p:dataExporter type="xls" target="datatableJogador" fileName="jogadores" />  
				        </h:commandLink>  
				  
				        <h:commandLink>  
				            <p:graphicImage value="/resources/imagens/pdf.png" />  
				            <p:dataExporter type="pdf" target="datatableJogador" fileName="jogadores"/>  
				        </h:commandLink>  
				          
				        <h:commandLink>  
				            <p:graphicImage value="/resources/imagens/csv.png" />  
				            <p:dataExporter type="csv" target="datatableJogador" fileName="jogadores" />  
				        </h:commandLink>  
				          
				        <h:commandLink>  
				            <p:graphicImage value="/resources/imagens/xml.png" />  
				            <p:dataExporter type="xml" target="datatableJogador" fileName="jogadores" />  
				        </h:commandLink>  
				    </p:panel>                
				</f:facet>		
			</p:dataTable>
		</h:form>
     </ui:define> 
</ui:composition>